import rules from '@/base/rules'
import mock from '@/utils/mock'

[...rules, {
  url: '/api/getAttachmentsList',
  params: {},
  template: {
    code: 0,
    message: '',
    data: {
      page: 1,
      limit: 10,
      total: 2,
      'list': [{
        'pkValue': '@guid',
        'title': '@ctitle'
      }, {
        'pkValue': '@guid',
        'title': '@ctitle'
      }]
    }
  }
}, {
  url: '/api/getImportList',
  params: {},
  template: {
    code: 0,
    message: '',
    data: {
      page: 1,
      limit: 10,
      total: 2,
      'cols': [
        {prop: 'date', label: '日期'},
        {prop: 'title', label: '标题'}
      ],
      'list': [{
        'title': '@ctitle',
        'date': '@date'
      }, {
        'title': '@ctitle',
        'date': '@date'
      }]
    }
  }
}].forEach(function (item) {
  mock(item)
})
